<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class SwtPledgeOrder extends Model
{
    use HasFactory, HasDateTimeFormatter;

    protected $table = 'swt_pledge_order';

    protected $guarded = [];
    public function user()
    {
        return $this->belongsTo(User::class, 'user_id');
    }

    public function trade()
    {
        return $this->belongsTo(SwtTradeAddress::class, 'trade_id');
    }

    public function pledge()
    {
        return $this->belongsTo(SwtPledge::class, 'pledge_id');
    }

    public function rule()
    {
        return $this->belongsTo(SwtPledgesRule::class, 'rule_id');
    }


}
